package com.shopping.pojo;

import javax.validation.constraints.Min;
import javax.validation.constraints.NotNull;

public class ShoppingCart {

    int id;
    int userId;
    @NotNull
    int tradeId;
    @NotNull
    int storeId;
    @Min(1)
    int number;

    public int getId() {
        return id;
    }

    public int getUserId() {
        return userId;
    }

    public void setUserId(int userId) {
        this.userId = userId;
    }

    public int getTradeId() {
        return tradeId;
    }

    public void setTradeId(int tradeId) {
        this.tradeId = tradeId;
    }

    public int getStoreId() {
        return storeId;
    }

    public void setStoreId(int storeId) {
        this.storeId = storeId;
    }

    public int getNumber() {
        return number;
    }

    public void setNumber(int number) {
        this.number = number;
    }

    @Override
    public String toString() {
        return "ShoppingCart{" +
                "id=" + id +
                ", userId=" + userId +
                ", tradeId=" + tradeId +
                ", storeId=" + storeId +
                ", number=" + number +
                '}';
    }
}
